package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * IeInformante generated by hbm2java
 */
@Entity
@Table(name = "IE_INFORMANTE", schema = "UPET")
@SequenceGenerator(name="SEQ_IE_INFORMANTE" , sequenceName="SEQ_IE_INFORMANTE")
public class IeInformante implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7508040441396456644L;
	private Long iieInformante;
	private RcRuc rcRuc;
	private IeFuenteDet ieFuenteDet;
	private String snotas;
	private Date frecepcion;
	private String cusuario;
	private Date fhingreso;
	private String mestado;
	private Set<IeInformanteDoc> ieInformanteDocs = new HashSet<IeInformanteDoc>(
			0);

	public IeInformante() {
	}

	public IeInformante(Long iieInformante, RcRuc rcRuc) {
		this.iieInformante = iieInformante;
		this.rcRuc = rcRuc;
	}

	public IeInformante(Long iieInformante, RcRuc rcRuc,
			IeFuenteDet ieFuenteDet, String snotas, Date frecepcion,
			String cusuario, Date fhingreso, String mestado,
			Set<IeInformanteDoc> ieInformanteDocs) {
		this.iieInformante = iieInformante;
		this.rcRuc = rcRuc;
		this.ieFuenteDet = ieFuenteDet;
		this.snotas = snotas;
		this.frecepcion = frecepcion;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.mestado = mestado;
		this.ieInformanteDocs = ieInformanteDocs;
	}

	@Id
	@Column(name = "I_IE_INFORMANTE", unique = true, nullable = false, precision = 10, scale = 0)
	@GeneratedValue(strategy=GenerationType.AUTO, generator="SEQ_IE_INFORMANTE")
	public Long getIieInformante() {
		return this.iieInformante;
	}

	public void setIieInformante(Long iieInformante) {
		this.iieInformante = iieInformante;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NIT", nullable = false)
	public RcRuc getRcRuc() {
		return this.rcRuc;
	}

	public void setRcRuc(RcRuc rcRuc) {
		this.rcRuc = rcRuc;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "I_FUENTE_DET")
	public IeFuenteDet getIeFuenteDet() {
		return this.ieFuenteDet;
	}

	public void setIeFuenteDet(IeFuenteDet ieFuenteDet) {
		this.ieFuenteDet = ieFuenteDet;
	}

	@Column(name = "S_NOTAS")
	public String getSnotas() {
		return this.snotas;
	}

	public void setSnotas(String snotas) {
		this.snotas = snotas;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "F_RECEPCION", length = 7)
	public Date getFrecepcion() {
		return this.frecepcion;
	}

	public void setFrecepcion(Date frecepcion) {
		this.frecepcion = frecepcion;
	}

	@Column(name = "C_USUARIO", length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Column(name = "M_ESTADO", length = 2)
	public String getMestado() {
		return this.mestado;
	}

	public void setMestado(String mestado) {
		this.mestado = mestado;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "ieInformante")
	public Set<IeInformanteDoc> getIeInformanteDocs() {
		return this.ieInformanteDocs;
	}

	public void setIeInformanteDocs(Set<IeInformanteDoc> ieInformanteDocs) {
		this.ieInformanteDocs = ieInformanteDocs;
	}

}
